package ciweb

import (
	"github.com/gogf/gf/net/ghttp"
	"go-middle/app/admin/service/ciservice"
	"go-middle/app/common/model/ci"
)

//List ci任务 列表
func List(r *ghttp.Request) {
	r.Response.WriteTpl("admin/ci/list.html")
}

//CiEdit ci任务 编辑
func CiEdit(r *ghttp.Request) {
	id := r.GetInt64("id", 0)
	if id > 0 {
		//编辑页面
		data := ciservice.GetCiByID(id)
		r.GetView().Assign("info", data)
	} else {
		//添加页面
		r.GetView().Assign("info", &ci.Entity{})
	}
	r.Response.WriteTpl("admin/ci/ci_edit.html")
}

//CiLogList ci任务 日志列表
func CiLogList(r *ghttp.Request) {
	r.Response.WriteTpl("admin/ci/ci_log.html")
}
